import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * Created by 我啊 on 2020/01/14.
 */
public class ServerDemo {
    public static void main(String[] args) throws IOException {
        ServerSocket socket=new ServerSocket(8864);
        Socket accept = socket.accept();
        InputStream inputStream = accept.getInputStream();
        OutputStream outputStream = accept.getOutputStream();
        String s = MsgUtils.readMsg(inputStream);
        System.out.println(s);
        MsgUtils.writeMsg(outputStream,"服务器相应三天之内就是你");
        accept.close();
    }
}
